Field of the Invention
The invention relates to a programmable logic controller.
Description of Related Art
A programmable logic controller (PLC) is connected to external equipment through a communication interface device. For example, the external equipment (for example, a bar code reader) adapted to serial communication is connected to a specific port of the communication interface device, and the external equipment and the PLC transceives data through the specific port. In this case, the PLC sends a command to the communication interface device to send data to the external equipment through the specific port, or sends a command to the communication interface device to receive data from the external equipment through the specific port. These commands are recorded in a user program of the PLC.
The communication interface device is sometimes directly installed on a connector of the PLC or sometimes installed on a coupler (slave) on a field network taking the PLC as a master, and when a user records the aforementioned commands in the user program, a connection position of the communication interface device (i.e. whether the communication interface device is directly installed on the connector of the PLC or installed on the coupler on the field network) has to be recognized for recording the commands.